package com.ruoyi.ams.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.ams.domain.AmsAssetAllocationDetail;
import com.ruoyi.ams.mapper.AmsAssetAllocationDetailMapper;
import com.ruoyi.ams.service.IAmsAssetAllocationDetailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 资产调拨单明细Service业务层处理
 * 
 * @author yfkj
 * @date 2022-05-16
 */
@Service
public class AmsAssetAllocationDetailServiceImpl extends ServiceImpl<AmsAssetAllocationDetailMapper, AmsAssetAllocationDetail>  implements IAmsAssetAllocationDetailService
{
    @Autowired
    private AmsAssetAllocationDetailMapper amsAssetAllocationDetailMapper;

    /**
     * 查询资产调拨单明细
     * 
     * @param allocationDetailId 资产调拨单明细主键
     * @return 资产调拨单明细
     */
    @Override
    public AmsAssetAllocationDetail selectAmsAssetAllocationDetailByAllocationDetailId(Long allocationDetailId)
    {
        return amsAssetAllocationDetailMapper.selectAmsAssetAllocationDetailByAllocationDetailId(allocationDetailId);
    }

    /**
     * 查询资产调拨单明细列表
     * 
     * @param amsAssetAllocationDetail 资产调拨单明细
     * @return 资产调拨单明细
     */
    @Override
    public List<AmsAssetAllocationDetail> selectAmsAssetAllocationDetailList(AmsAssetAllocationDetail amsAssetAllocationDetail)
    {
        return amsAssetAllocationDetailMapper.selectAmsAssetAllocationDetailList(amsAssetAllocationDetail);
    }

    /**
     * 新增资产调拨单明细
     * 
     * @param amsAssetAllocationDetail 资产调拨单明细
     * @return 结果
     */
    @Override
    public int insertAmsAssetAllocationDetail(AmsAssetAllocationDetail amsAssetAllocationDetail)
    {
        return amsAssetAllocationDetailMapper.insertAmsAssetAllocationDetail(amsAssetAllocationDetail);
    }

    /**
     * 修改资产调拨单明细
     * 
     * @param amsAssetAllocationDetail 资产调拨单明细
     * @return 结果
     */
    @Override
    public int updateAmsAssetAllocationDetail(AmsAssetAllocationDetail amsAssetAllocationDetail)
    {
        return amsAssetAllocationDetailMapper.updateAmsAssetAllocationDetail(amsAssetAllocationDetail);
    }

    /**
     * 批量删除资产调拨单明细
     * 
     * @param allocationDetailIds 需要删除的资产调拨单明细主键
     * @return 结果
     */
    @Override
    public int deleteAmsAssetAllocationDetailByAllocationDetailIds(Long[] allocationDetailIds)
    {
        return amsAssetAllocationDetailMapper.deleteAmsAssetAllocationDetailByAllocationDetailIds(allocationDetailIds);
    }

    /**
     * 删除资产调拨单明细信息
     * 
     * @param allocationDetailId 资产调拨单明细主键
     * @return 结果
     */
    @Override
    public int deleteAmsAssetAllocationDetailByAllocationDetailId(Long allocationDetailId)
    {
        return amsAssetAllocationDetailMapper.deleteAmsAssetAllocationDetailByAllocationDetailId(allocationDetailId);
    }
}
